package com.hs.sfzy.mapper;

import com.hs.sfzy.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {

    @Select("select id,username from user")
    List<User> getUserIdAndName();

    /**
     * 根据id获取用户信息
     * @author QinKunPeng
     * @date 2024/10/24 20:26
     * @param id
     * @return null
     */
    User getUserById(Long id);

    int insert(User user);

    int update(User user);

    int delete(Long id);

    List<User> selectAll(User user);

    User selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);
}
